/** @file StaticBanner.qml
@brief Standard static banner usually shown on top of the screen.

@authorname \n
@licenseversion \n
@actualversion - @dateupdate

@licensenote
*/

import QtQuick 1.0
import "Theme.js" as JsObj

Item {
    id: objectContainer

    // The entire object is sized as the program reqires
    width: objLoad.getWidth();
    height: objLoad.getHeight();

    // Background monochromatic rectangle to fill the area
    // backside the banner image
    Rectangle {
        id: bannerBackground
        color: objLoad.getColor();
        width: parent.width;
        height: parent.height
    }
    // Background image that stay on top of the banner rectangle.
    // The color is relevant when the banner of the banner background
    // are images that includes transparent areas
    Image {
        id: imageBackground
        width: parent.width;
        height: parent.height
        source: JsObj.getBannerBackground(objLoad.getTheme());
    }
    // The banner image.
    // When the screen geometry is wider than the banner, the background
    // rectangle and image fill the remaining parts.
    Image {
        id: banner
        height: parent.height
        width: parent.width
        anchors.horizontalCenter: objectContainer.horizontalCenter
        fillMode: Image.PreserveAspectFit
        source: JsObj.getBanner(objLoad.getTheme());
    }
}
